import { request } from '@/utils/hsj/service/index'

// 查询行业列表
export function listResourceStructure(query) {
  return request({
    url: '/system/resourceStructure/list',
    method: 'get',
    params: query,
  })
}

// 查询行业列表（排除节点）
export function listResourceStructureExcludeChild(resourceStructureId) {
  return request({
    url: '/system/resourceStructure/list/exclude/' + resourceStructureId,
    method: 'get',
  })
}

// 查询行业详细
export function getResourceStructure(resourceStructureId) {
  return request({
    url: '/system/resourceStructure/' + resourceStructureId,
    method: 'get',
  })
}

// 新增行业
export function addResourceStructure(data) {
  return request({
    url: '/system/resourceStructure',
    method: 'post',
    data: data,
  })
}

// 修改行业
export function updateResourceStructure(data) {
  return request({
    url: '/system/resourceStructure',
    method: 'put',
    data: data,
  })
}

// 删除行业
export function del(resourceStructureId) {
  return request({
    url: '/system/resourceStructure/' + resourceStructureId,
    method: 'delete',
  })
}
